package cn.wen.base.util;

import android.app.Application;
import android.content.Context;

/**
 * App的配置
 */

public class AppConfig {
    /**
     * 是不是调试，上线改成false，在这统一改
     */
    public static final boolean IS_DEBUG = true;
    private static volatile AppConfig mInstance;
    private Application mApplication;

    public static AppConfig getInstance() {
        if (mInstance == null) {
            synchronized (AppConfig.class) {
                if (mInstance == null) {
                    mInstance = new AppConfig();
                }
            }
        }
        return mInstance;
    }

    public Application getApplication() {
        return mApplication;
    }

    public Context getContext() {
        return mApplication.getApplicationContext();
    }

    public void init(Application context) {
        mApplication = context;
    }
}
